package com.ruoyi.attendance.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 员工考勤记录对象 attendance_record
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
public class AttendanceRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 考勤记录ID，主键 */
    @Excel(name = "考勤记录ID，主键")
    private Integer id;

    /** 用户ID，关联员工表 */
    @Excel(name = "用户ID，关联员工表")
    private Integer userId;

    /** 用户的部门id */
    @Excel(name = "用户的部门id")
    private Integer deptId;

    /** 用户姓名（冗余存储） */
    @Excel(name = "用户姓名", readConverterExp = "冗=余存储")
    private String userName;

    /** 部门名称（冗余存储） */
    @Excel(name = "部门名称", readConverterExp = "冗=余存储")
    private String departmentName;

    /** 职位名称（冗余存储） */
    @Excel(name = "职位名称", readConverterExp = "冗=余存储")
    private String positionName;

    /** 实际上班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际上班打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date clockInTime;

    /** 实际下班打卡时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际下班打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date clockOutTime;

    /** 实际上班时长(小时) */
    @Excel(name = "实际上班时长(小时)")
    private BigDecimal actualWorkHours;

    /** 应上班时长(小时) */
    @Excel(name = "应上班时长(小时)")
    private BigDecimal requiredWorkHours;

    /** 加班时长(小时) */
    @Excel(name = "加班时长(小时)")
    private BigDecimal overtimeHours;

    /** 考勤日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "考勤日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date recordDate;

    /** 删除标志（0代表存在 2代表删除） */
    private Integer delFlag;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 打卡状态:
0: 暂定
1: 正常
2: 迟到 */
    @Excel(name = "打卡状态")
    private Integer earlyRecordStatus;

    /** 打卡状态:
0: 暂定
1: 正常
3: 早退 */
    @Excel(name = "打卡状态")
    private Integer lateRecordStatus;

    /** 打卡状态:
0: 暂定
1: 正常
2: 无加班 */
    @Excel(name = "打卡状态")
    private Integer overtimeRecordStatus;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setUserId(Integer userId) 
    {
        this.userId = userId;
    }

    public Integer getUserId() 
    {
        return userId;
    }

    public void setDeptId(Integer deptId) 
    {
        this.deptId = deptId;
    }

    public Integer getDeptId() 
    {
        return deptId;
    }

    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    public void setDepartmentName(String departmentName) 
    {
        this.departmentName = departmentName;
    }

    public String getDepartmentName() 
    {
        return departmentName;
    }

    public void setPositionName(String positionName) 
    {
        this.positionName = positionName;
    }

    public String getPositionName() 
    {
        return positionName;
    }

    public void setClockInTime(Date clockInTime) 
    {
        this.clockInTime = clockInTime;
    }

    public Date getClockInTime() 
    {
        return clockInTime;
    }

    public void setClockOutTime(Date clockOutTime) 
    {
        this.clockOutTime = clockOutTime;
    }

    public Date getClockOutTime() 
    {
        return clockOutTime;
    }

    public void setActualWorkHours(BigDecimal actualWorkHours) 
    {
        this.actualWorkHours = actualWorkHours;
    }

    public BigDecimal getActualWorkHours() 
    {
        return actualWorkHours;
    }

    public void setRequiredWorkHours(BigDecimal requiredWorkHours) 
    {
        this.requiredWorkHours = requiredWorkHours;
    }

    public BigDecimal getRequiredWorkHours() 
    {
        return requiredWorkHours;
    }

    public void setOvertimeHours(BigDecimal overtimeHours) 
    {
        this.overtimeHours = overtimeHours;
    }

    public BigDecimal getOvertimeHours() 
    {
        return overtimeHours;
    }

    public void setRecordDate(Date recordDate) 
    {
        this.recordDate = recordDate;
    }

    public Date getRecordDate() 
    {
        return recordDate;
    }

    public void setDelFlag(Integer delFlag) 
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() 
    {
        return delFlag;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setEarlyRecordStatus(Integer earlyRecordStatus) 
    {
        this.earlyRecordStatus = earlyRecordStatus;
    }

    public Integer getEarlyRecordStatus() 
    {
        return earlyRecordStatus;
    }

    public void setLateRecordStatus(Integer lateRecordStatus) 
    {
        this.lateRecordStatus = lateRecordStatus;
    }

    public Integer getLateRecordStatus() 
    {
        return lateRecordStatus;
    }

    public void setOvertimeRecordStatus(Integer overtimeRecordStatus) 
    {
        this.overtimeRecordStatus = overtimeRecordStatus;
    }

    public Integer getOvertimeRecordStatus() 
    {
        return overtimeRecordStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("userName", getUserName())
            .append("departmentName", getDepartmentName())
            .append("positionName", getPositionName())
            .append("clockInTime", getClockInTime())
            .append("clockOutTime", getClockOutTime())
            .append("actualWorkHours", getActualWorkHours())
            .append("requiredWorkHours", getRequiredWorkHours())
            .append("overtimeHours", getOvertimeHours())
            .append("recordDate", getRecordDate())
            .append("delFlag", getDelFlag())
            .append("createdAt", getCreatedAt())
            .append("earlyRecordStatus", getEarlyRecordStatus())
            .append("lateRecordStatus", getLateRecordStatus())
            .append("overtimeRecordStatus", getOvertimeRecordStatus())
            .toString();
    }
}
